<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="CSI.Directory.Core.Model"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div class="main_center_content">
<div class="left_content">

  <div class="leftnav-button">Why Log On</div>           
  <br />
  <div class="leftnav-button">Mission Statement</div>           
  <br />
  <div class="leftnav-button">Advertise</div>      
  <br />
  <div class="leftnav-button">Jobs</div>      
  <br />
  <div class="leftnav-button">Refer</div>      
  <br />
  <div class="leftnav-button">News</div>      
  <br />
  <div class="leftnav-button">Special Events</div>      
            
</div><!--end of left content-->

<div class="right_content">
    <span class="catHead"><%=((County)ViewData["County"]).Name%></span>
       
    <br />
    <%
        foreach (var l in ((IList<Listing>)ViewData["Listings"]))
        {%>
          <div id="listings">
             <h2><%=l.Name %></h2>
             <%if (!string.IsNullOrEmpty(l.Image))
               { %>
                <img src="/Assets/Images/<%=l.Image %>" style="float:left;padding-right:5px" />
             <%} %>
             
             <%if (!string.IsNullOrEmpty(l.Contact)) {%><%=l.Contact%><br />   <%} %>
             
             <%=l.AddressLine1 %><br />
             <%if (!string.IsNullOrEmpty(l.AddressLine2))
               { %>
                <%=l.AddressLine2 %><br />
             <%} %>
             
             <%=l.City %>, <%=l.State %> <%=l.Zip %><br />
             <%if (!string.IsNullOrEmpty(l.Phone)) {%><%=l.Phone %><br />   <%} %>
             <%if (!string.IsNullOrEmpty(l.Email)) {%><%=l.Email%><br />   <%} %>
             <%if (!string.IsNullOrEmpty(l.Url))
               { %>
                    <a href="<%=l.Url %>"><%=l.Url %></a><br />
             <%} %>
             <p style="padding-top:5px;clear:both;white-space: normal;word-wrap:break-word;"><%=l.Description %></p><br />
             
            
             
             
            </div>
            
            
            <br /> 
            <br />
          
          
        <%} %>
        <span style="right:30px;z-index: 5;">
        <%if ((int)ViewData["Pages"] > 1)
          {
              for (int i = 1; i <= (int)ViewData["Pages"]; i++)
              {
                  if (i == (int)ViewData["Page"])
                  {%>
                    <%=i%>&nbsp;
                  <%}
                  else
                  { %>
              
               
                    <a href="<%=((Category)ViewData["Category"]).Name %>?page=<%=i %>"><%=i%>&nbsp;</a> 
                <%} %>
            <%}
          } %>
          </span>
</div>
<div class="clear"></div>
</div>
</asp:Content>
